Skip to content

fix(cli, api): tolerate unrecognised model config and dataset flag values - #452

Merged
joe-prosser merged 2 commits into
masterfrom
joe/RE-12983-model-config-enum-drift
Jul 31, 2026
Merged

fix(cli, api): tolerate unrecognised model config and dataset flag values#452
joe-prosser merged 2 commits into
masterfrom
joe/RE-12983-model-config-enum-drift

Conversation

@joe-prosser

@joe-prosser joe-prosser commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

A dataset using an attribution method, model version, extraction flag or dataset flag this CLI didn't recognise made GET /api/v1/datasets fail to parse. Because that endpoint returns every dataset on the tenant, a single such dataset broke re get datasets, re prune, re get custom-label-trend-report and re package upload — even when the dataset being operated on was unaffected.

Reported by a customer whose re package upload failed on table_formatted_word_ids. A generative_extraction dataset flag turned out to reproduce it independently, with no IXP config involved at all.

  • Adds the missing values: table_formatted_word_ids, gemini_3_1_flash_lite_preview, and the conversational_filters / generative_extraction / generative_prelabelling / llm_assisted_labelling dataset flags.
  • Gives each of the four enums an Unknown fallback so later platform additions are preserved as-is rather than rejected, and still round-trip unchanged through re package upload. This uses per-variant #[serde(untagged)], hence the serde floor moving to 1.0.164.
  • Fixes wait_for_dataset_to_exist computing its deadline backwards — start_time - Instant::now() saturates to zero, so --dataset-creation-timeout was a no-op and the loop never terminated.

Breaking change to the reinfer-client API: the four enums gain a variant and three are no longer Copy, so this wants a minor version bump.

Not in scope, worth follow-ups: ModelConfig's kind tag still has no Unknown fallback, and --dataset-creation-timeout has no hard wall-clock bound (each poll makes retrying HTTP calls).

RE-12983

…lues

A dataset using an attribution method, model version, extraction flag or
dataset flag the CLI didn't recognise made GET /api/v1/datasets fail to
deserialize. That endpoint returns every dataset on the tenant, so a single
such dataset broke `re get datasets`, `re prune`,
`re get custom-label-trend-report` and `re package upload` -- even when the
dataset being operated on was unaffected.

Adds the missing values and gives each of the four enums an Unknown fallback,
so later platform additions are preserved as-is rather than rejected and still
round-trip unchanged through `re package upload`. Also fixes
wait_for_dataset_to_exist computing its deadline backwards, which made
--dataset-creation-timeout a no-op and left the poll loop unbounded.

RE-12983

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@joe-prosser joe-prosser self-assigned this Jul 31, 2026
The GitHub runners have moved to Rust 1.97, where
clippy::useless_borrows_in_formatting flags a redundant `&` on a format!
argument. Both crates set `#![deny(clippy::all)]`, so this fails the clippy
job on master and on every open PR.

Neither line is new -- the one in api/src/lib.rs dates from 2021 -- they
simply weren't linted until the toolchain bump.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@joe-prosser
joe-prosser merged commit a848f27 into master Jul 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant